﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="2016020719_4.aspx.cs" Inherits="web5._2016020719_4" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        请输入你的电话号码：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ControlToValidate="TextBox1" ErrorMessage="电话号码的格式不符" ForeColor="Red" 
            ValidationExpression="(\(\d{3,4}\)| \d{3,4} -?\d{8} | \d{7})"></asp:RegularExpressionValidator>
        <br />
        请输入你的电子邮箱：<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
            ControlToValidate="TextBox2" ErrorMessage="邮箱格式不符" ForeColor="Red" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
        <br />
        请输入你的邮政编码：<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
            ControlToValidate="TextBox3" ErrorMessage="邮政编码格式不符" ForeColor="Red" 
            ValidationExpression="\d{6}"></asp:RegularExpressionValidator>
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="提交" />
    
    </div>
    </form>
</body>
</html>
